import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooAiClientController } from '../../../controllers';
const uctooaiClientRouter = new Router();
const aiClientController = new uctooAiClientController();

uctooaiClientRouter.post('/add', requireUser, aiClientController.add);
uctooaiClientRouter.post('/edit', requireUser, rowLevelPermission('uctoo/ai_client'), aiClientController.edit);
uctooaiClientRouter.post('/del', requireUser, rowLevelPermission('uctoo/ai_client'), aiClientController.delete);

//For getting aiClient with permission control
uctooaiClientRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/ai_client'), aiClientController.getSingle);
uctooaiClientRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/ai_client'), aiClientController.getMany);
uctooaiClientRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/ai_client'), aiClientController.getMany);

//#endregion AutoCreateCode
export default uctooaiClientRouter;
